WireGuard 系列文章(三):WireGuard 安装 | 您所在的位置:网站首页 › 威联通 android › WireGuard 系列文章(三):WireGuard 安装 |
系列文章前情提要: 1.WireGuard系列文章 (一):什么是V**[1]2.WireGuard 系列文章 (二):WireGuard 简介 - 快速、现代、安全的 V** 隧道[2] WireGuard 的安装都不难,这里以我用到的设备为例,包括: 1.Linux - Ubuntu 20.04 2.Windows 10 3.NAS - 威联通 QTS 5.0 4.安卓 Ubuntu 20.04⚠️ 注意: WireGuard 对 Linux 内核版本有要求,5.4 以上内核才将其纳入其中。如果内核低于该版本(典型如:RHEL 和 CentOS),就需要比较复杂的涉及内核编译的过程,请自行登录官网[3]查找详细信息。 $ sudo apt install wireguard安装成功后,有以下文件: 1.CLI1.wg 2.wg-quick 2.Systemd 2.wg-quick.target # which wg /usr/bin/wg # WireGuard CLI # which wg-quick /usr/bin/wg-quick # WireGuard 快速 CLI # sudo ls -l /etc/ drwx------ 2 root root 4096 Aug 4 2020 wireguard # WireGuard 默认配置文件位置 # sudo systemctl list-unit-files UNIT FILE STATE VENDOR PRESET [email protected] disabled enabled wg-quick.target static enabled # pwd /lib/systemd/system # WireGuard 2 个 Service 所在的目录 # cat [email protected] # /usr/lib/systemd/system/[email protected] [Unit] Description=WireGuard via wg-quick(8) for %I After=network-online.target nss-lookup.target Wants=network-online.target nss-lookup.target PartOf=wg-quick.target Documentation=man:wg-quick(8) Documentation=man:wg(8) Documentation=https://www.wireguard.com/ Documentation=https://www.wireguard.com/quickstart/ Documentation=https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8 Documentation=https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8 [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/bin/wg-quick up %i ExecStop=/usr/bin/wg-quick down %i ExecReload=/bin/bash -c 'exec /usr/bin/wg syncconf %i |
CopyRight 2018-2019 实验室设备网 版权所有 |